<?php
session_start();
require_once '../header.php';
function __autoload($className)
	{
    	require_once('../class/' . $className . '.class.php');
	}
session::need_member();
$findAgent=buyPaypal::findPaypalAgent();
unset($_SESSION["pp"]);
unset($_SESSION["ppid"]);
unset ($_SESSION["plan"]);
unset($_SESSION["paypalAgent"]);
if(!empty($_GET))
{
	$get=$_GET;
	$agent=strval($get['agent']);
	$agent=strtolower($agent);
	$country=strval($get['country']);
	$country=strtolower($country);
	$paypalType=strval($get['paypalType']);
	$paypalType=strtolower($paypalType);
	$is_verify=strval($get['is_verify']);
	$is_verify=strtolower($is_verify);
	$have_mailpass=strval($get['have_mailpass']);
	$have_mailpass=strtolower($have_mailpass);
	$checkVariable=$country.$paypalType.$is_verify.$have_mailpass.$agent;
	$verify=verify::check($checkVariable);
	if($verify==0)
	{
		$_SESSION["paypalAgent"]=$agent;
		$_SESSION["countrybuy"]=$country;
		$plusMoney=buyPaypal::plusmoney($paypalType, $have_mailpass);
		$_SESSION["plusmoney"]=$plusMoney;
		if($agent=="mrhieu")
		{
			$searchPaypal=mrhieu::searchPaypal($country, $paypalType, $is_verify, $have_mailpass,$plusMoney);
		}
		require_once '../html/showPaypal.php';
	}
	else
	{
		echo "No thing";
	}
}
else
{
	require_once '../html/buyPaypal.php';
}

?>